<?php

namespace api\controller;

// +----------------------------------------------------------------------
// | 实体控制层
// +----------------------------------------------------------------------

use common\controller\VerifyController;
use common\service\EntityEpisodeRelationService;
use think\Request;

class EntityEpisodeRelationController extends VerifyController
{
    protected $entityEpisodeRelationService;

    public function __construct()
    {
        $this->entityEpisodeRelationService = new EntityEpisodeRelationService();
        parent::__construct();
    }


    /**
     * 查询实体的关联关系
     * @param Request $request
     * @return \think\Response
     */
    public function relationSelect(Request $request)
    {
        $param = $request->param()['param'];
        $res = $this->entityEpisodeRelationService->relationSelect($param['filter']);
        return json(success_response('OK', $res));
    }

    /**
     * 删除关联关系
     * @param Request $request
     * @return \think\Response
     */
    public function relationDelete(Request $request)
    {
        $param = $request->param()['param'];
        $res = $this->entityEpisodeRelationService->relationDelete($param['filter']);
        return json(success_response('OK', $res));
    }
}
